/*************
 **
 ** Project:      stopwatch
 ** File info:    $Id: TextWhereIsIt.qml 23 2012-05-04 10:44:29Z Kuzma.Shapran@gmail.com $
 ** Author:       Copyright (C) 2011 Kuzma Shapran <Kuzma.Shapran@gmail.com>
 ** License:      GPLv3
 **
 **  This file is part of Stopwatch.
 **
 **  Stopwatch is free software: you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License as published by
 **  the Free Software Foundation, either version 3 of the License, or
 **  (at your option) any later version.
 **
 **  Stopwatch is distributed in the hope that it will be useful,
 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 **  GNU General Public License for more details.
 **
 **  You should have received a copy of the GNU General Public License
 **  along with Stopwatch.  If not, see <http://www.gnu.org/licenses/>.
 **
 *************/


import QtQuick 1.1
import com.nokia.symbian 1.1

Item {
    property alias text: text.text

    signal clicked

    width: parent.width
    height: ((text.width + text.anchors.leftMargin + 10 + button.width) > width) ? (text.height + button.height) : Math.max(text.height,button.height)

    Text {
        id: text
        anchors {
            left: parent.left
            leftMargin: 20
            top: parent.top
        }
        font.pixelSize: platformStyle.fontSizeMedium
        color: platformStyle.colorNormalLight

        horizontalAlignment: Text.AlignJustify
        wrapMode: Text.Wrap
    }

    Button {
        id: button
        anchors{
            right: parent.right
            bottom: parent.bottom
        }
        font.pixelSize: platformStyle.fontSizeSmall

        text: "Where is it?"

        onClicked: parent.clicked()
    }
}
